The present disclosure relates to an information processing apparatus configured to process an image, a method for controlling the information processing apparatus, and a program.
In recent years, enhanced performance and high functionality of general-purpose computer hardware enable image processing by using general-purpose computer hardware, which only dedicated hardware was able to implement before. In the computer hardware, specifically, CPUs and memories used as main memories exhibit extremely high speed, and as a result, various complicated effect processing with respect to large-capacity image data may be performed in an economic and satisfying time period.
Image processing may be performed at a further higher speed by introducing GPU (Graphics Processing Unit) which is an arithmetic processing device designed so as to be specialized in parallel arithmetic processing. The parallel arithmetic processing by GPU may exhibit enhanced performance specifically in processing in which arithmetic results of part of processing do not affect the entire processing such as image processing. The parallel arithmetic processing by GPU is implemented by a mechanism including issuing the same instructions to a plurality of arithmetic units and executing the same instructions by the respective arithmetic units independently. To the contrary, in CPU, different instructions are issued to a plurality of arithmetic units and the arithmetic units execute different instructions, respectively. Therefore, CPU is suitable for sequential processing.
Further, recently, a technical field of GPGPU (General-Purpose computing on Graphics Processing Units) which enables GPU not only to perform image processing but also to be used for other numerical processing is known.
Japanese Patent Application Laid-open No. 2008-513890 (paragraph 0027) (hereinafter, referred to as Patent Document 1) describes load distribution in a case where a CPU and a GPU process a work unit. Specifically, the GPU calculates, in parallel, intersections of a plurality of rays and a set of surfaces bounding at least one graphic object, and the CPU calculates intersections of at least some of the plurality of rays and the graphical objects. However, Patent Document 1 fails to describe that image processing is distributed to a CPU and a GPU to be performed, that an optimum image processing subject is selected considering states of load of the CPU and the GPU, and the like.
As described above, in recent years, high speed of CPU enables practically enough response in image processing. That is, sharing and performing image processing, which was dependent on only GPU, by CPU and GPU increases the possibility of performing the image processing at a higher speed than performing only by GPU, as a result. Further, even if CPU and GPU share to perform image processing at the highest speed from the viewpoint of specs, according to load states of CPU and GPU or usage states of their memories, GPU may perform the image processing at a higher speed by itself than the case where CPU and GPU share the image processing. As described above, sharing and performing image processing by CPU and GPU is not always optimum from the viewpoint of speed.